package com.example.service.impl;

import com.example.dao.UserDao;
import com.example.service.DeleteManyService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
@Transactional
public class DeleteManyServiceImpl implements DeleteManyService {

    @Resource
    private UserDao userDao;

    @Override
    public void deleteMany(String[] uids) {
        for (String uid:uids) {
            userDao.deleteByPrimaryKey(Integer.parseInt(uid));
        }
    }
}
